package jmine.tec.web.wicket.component.menu.cfg;

import jmine.tec.web.wicket.component.menu.JSCookMenuPanel;
import jmine.tec.web.wicket.component.menu.MenuPanel;
import jmine.tec.web.wicket.component.menu.MenuPrincipal;

/**
 * Adaptados de MenuConfig para que seja gerado um JSCookMenuPanel
 * 
 * @author lundberg
 */
public class MenuConfigJSCookAdapter implements MenuPrincipal {

    private final MenuConfig config;

    /**
     * Construtor
     * 
     * @param config config
     */
    public MenuConfigJSCookAdapter(MenuConfig config) {
        super();
        this.config = config;
    }

    /**
     * {@inheritDoc}
     */
    public MenuPanel getMenuPanel(String id) {
        return new JSCookMenuPanel(id, this.config);
    }

}
